package com.myNovel.novel.service.impl;

import com.myNovel.novel.core.common.resp.RestResp;
import com.myNovel.novel.dto.resp.HomeBookRespDto;
import com.myNovel.novel.manager.HomeBookCacheManager;
import com.myNovel.novel.service.HomeService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author：Guxx
 * @Package：com.myNovel.novel.service.impl
 * @Date：2024/3/29 14:16
 * @Filename：HomeServiceImpl
 */
@Service
@RequiredArgsConstructor
public class HomeServiceImpl implements HomeService {
    private final HomeBookCacheManager homeBookCacheManager;
    @Override
    public RestResp<List<HomeBookRespDto>> listHomeBooks() {
        return RestResp.ok(homeBookCacheManager.listHomeBooks());
    }
}
